package cn.rongdao.jrkabao.model.cashadvance;

import com.mifengkong.frtools.http.request.HttpFunction;
import com.mifengkong.frtools.util.FRString;

import cn.rongdao.jrkabao.model.api.BaseKaMaoModel;
import io.reactivex.Observable;
import io.reactivex.Observer;

/**
 * Created by jack on 2017/6/3
 */

public class DeleteCreditCardModel extends BaseKaMaoModel {

    public static DeleteCreditCardModel getInstance() {
        return getPresent(DeleteCreditCardModel.class);
    }

    public void executeCreditCard(String id, Observer<String> observer) {
        addParamStrings("id", FRString.valueOf(id));
        Observable<String> observable = mServletApi.deleteCreditCard(mParams).map(new HttpFunction<String>());
        toSubscribe(observable, observer);
    }

    public void executeDepositCard(String id, Observer<String> observer){
        addParamStrings("id", FRString.valueOf(id));
        Observable<String> observable = mServletApi.deleteDepositCard(mParams).map(new HttpFunction<String>());
        toSubscribe(observable, observer);
    }

}
